local Title = Class(function(self, inst)
	self.inst = inst

	-- inst:DoTaskInTime(0, function()self:ShowTitle() end)
	-- local clock = inst
end)

function Title:OnGameInit()
	local prefab = self.inst.prefab
	local data = STRINGS.UI.RG_LEVEL_INFO[prefab:sub(4):upper()]
	assert(data)

	self:ShowTitle(data.TITLE, data.SUBTITLE)
end

function Title:ShowTitle(h1, p)
	SetPause(true)
	TheFrontEnd.title:SetSize(70)
	TheFrontEnd.subtitle:SetSize(100)
	TheFrontEnd:ShowTitle(p, h1)
	TheFrontEnd:Fade(true, 1, function() 
		SetPause(false)
		TheMixer:SetLevel("master", 1) 
		TheMixer:PushMix("normal") 
		TheFrontEnd:HideTitle()
	end, 3, function() SetPause(false) end )
end

return Title

